<script lang="ts" setup>
import { ref } from "vue";
import SliderVerify from "@/components/SliderVerify.vue";
import VueSimpleVerify from "@/components/SimpleVerify/index.vue";

const verifyRef =  ref(null);

const handleSuccess = () => {
  console.log("success");
};
const handleError = () => {
  console.log("error");
};
const handleReset = () => {
  console.log("reset");
};
const onReset = () => {
  if (verifyRef.value) {
     (verifyRef.value as any)?.reset();
  }
};
</script>
<template>
  <div>
    <SliderVerify
      ref="block"
      :imgs="[]"
      :w="310"
      :h="155"
      slider-text="向右滑动"
    ></SliderVerify>

    <VueSimpleVerify
      ref="verifyRef"
      @success="handleSuccess"
      @reset="handleReset"
    ></VueSimpleVerify>
    <button @click="onReset" class="text-white">重置验证</button>
  </div>
</template>
